package book;

public class BookList {

    private int useSize;


//    new一个书架
    Book [] books = new Book[10];

    //    将书以数组的形式放入书架
    public BookList() {
        this.books[0] = new Book("三国演义","罗贯中",13,"小说");
        this.books[1] = new Book("西游记","吴承恩",11,"小说");
        this.books[2] = new Book("红楼梦","曹雪芹",15,"小说");
        this.useSize = 3;
    }

    public int getUseSize() {
        return useSize;
    }

    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }

    public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBooks(int pos,Book books) {
        this.books[pos] = books;
    }

    public  Book[] getBooks(){
        return books;
    }
}
